﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Tour.BLL;
using Tour.DAL;

public partial class Controls_Tourist_TourDetail : VST.Controls.BaseLCGUserControl
{
    public int? TourId { get; set; }
    protected void Page_Load(object sender, EventArgs e)
    {
        GetPropertyFromQueryString();        
        if (!IsPostBack)
        {
            LoadData();
            LoadTourDetail();
        }
    }
    void GetPropertyFromQueryString()
    {
        if (Request["TourId"] != null)
            TourId = Request["TourId"].ToInt();
        else
            TourId = null;
    }
    void LoadData()
    {
        //int TotalRow = 0;
        rpt.DataSource = TblTourManager.CreateInstant().SelectTblTourBy(TourId, null, "", true, true, true, true, "", "");
        rpt.DataBind();        
    }
    void LoadTourDetail()
    {
        //int TotalRow = 0;
        rptTourDetail.DataSource = TblTourDetailManager.CreateInstant().SelectTourDetailBy(null, TourId, "", "");
        rptTourDetail.DataBind();
    }
}